<template>
  <div>
    <!-- <img v-for="item in arr" :key="item.id" :src="$pre + item.img" alt="" /> -->

    <van-swipe :autoplay="3000">
      <van-swipe-item v-for="(item) in arr" :key="item.id">
        <img :src="$pre + item.img" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import { reqhomebanner } from "../../../http/http";
export default {
  data() {
    return {
      arr: [],
    };
  },
  mounted() {
    reqhomebanner().then((res) => {
      //   console.log(res);
      this.arr = res.data.list;
    });
  },
};
</script>

<style lang="less" scoped>
@import "../../../less/index.less";
img {
  width: 100%;
  height: 3.8rem;
}
</style>